<template>
  <el-form-item :label="$t('designer.setting.displayType')" v-if="selectedWidget.type === 'input'">
    <el-select v-model="thisOptionModel.type">
      <el-option label="text" value="text"></el-option>
      <!-- 当input的type设置为number时，如果输入非数字字符，则v-model拿到的值为空字符串，无法实现输入校验！故屏蔽之！！ -->
      <!--
      <el-option label="number" value="number"></el-option>
      -->
      <el-option label="password" value="password"></el-option>
    </el-select>
  </el-form-item>
</template>

<script>

  export default {
    name: "type-editor",
    mixins: [],
    props: {
      designer: Object,
      selectedWidget: Object,
      optionModel: Object,
    },
    computed: {

    },
	  data(){
		  return {
			  thisOptionModel:this.optionModel
		  }
	  },
	  watch: {
		  'optionModel': {
			  handler(val) {
				  if (val) {
					  this.thisOptionModel = val
				  }
			  }
		  },
	  },
  }
</script>

<style lang="scss" scoped>

</style>
